package com.xq.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/18 9:26
 * @description 监听器类
 */
public class AppListener implements ServletContextListener {
    /**
     * 上下文容器已初始化的监听
     * @param sce 容器监听对象
     */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("contextInitialized：上下文容器已初始化的监听");
    }

    /**
     * 上下文容器销毁的监听
     * @param sce 容器监听对象
     */
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("contextDestroyed：上下文容器销毁的监听");
    }
}
